package com.ship.dispatch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ship.dispatch.bean.SpDispatchOptimizeSchemeDetail;
import com.ship.dispatch.bean.SpYearPlanSchemeDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface SpDispatchOptimizeSchemeDetailMapper extends BaseMapper<SpDispatchOptimizeSchemeDetail> {

    @Select("select * from sp_dispatch_scheme_detail where  scheme_number is not null and create_by = #{createBy} and plan_id = #{planId} ORDER BY create_date desc limit 1")
    SpDispatchOptimizeSchemeDetail selectMaxOptimizeSchemeDetail(@Param(value = "createBy") String createBy, @Param(value = "planId") Long planId);

}
